/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2023. All rights reserved.
 */

#include <linux/ratelimit_types.h>

/*
 * AER log ratelimit
 * a complete aer log is composed of log from several functions
 * use printk_ratelimit for each aer log print statement will lose part
 * of the aer log cause the log to be incomplete
 * @rs: ratelimit_state data
 * @log_start: first aer log print statement
 */
#ifdef CONFIG_EULEROS_ADD_RATELIMIT
bool aer_ratelimit(bool log_start);
#else
static inline bool aer_ratelimit(bool log_start)
{
	return true;
}
#endif
